<?php 
include('common_include.php');

$initAboutUs = '';
$dao = new SQLitePersistence();
$initAboutUs = $dao->getAboutUsInfo();

$headOfficeInfo = '';
$headOfficeInfo = $dao->getHeadOffice();

$showroomInfo = '';
$showroomInfo = $dao->getShowroom();

$announcementInfo = array();
$announcementInfo = $dao->getAllAnnouncement();

$factoryInfo = array();
$factoryInfo = $dao->getAllFactory();

$outletInfo = array();
$outletInfo = $dao->getAllOutlet();

unset($dao);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Winning Marketing</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
<!--
.style1 {font-size: 18px}
.style2 {color: #FFFF00}
.style3 {font-size: 16px}
.style4 {color: #FFFFFF}
-->
    </style>
</head>

<body>
<div id="container">
	<div id="main">
		<div id="header"><img src="images/template/skitemplate_03.gif" width="753" height="341" class="clear" /></div>
		<div id="nav">
			<ul>
				<li><a href="index.php">About Us </a></li>
				<li><a href="product.php">Products</a></li>
				<li><a href="wholesale.html">Wholesale / Export</a></li>
				<li><a href="members.html">Members Area </a></li>
				<li><a href="contactUs.html">Enquiry / Contact us</a></li>
				<li><a href="Settlement.php">Shopping Cart</a></li>
			</ul>
		</div>
		<div id="content">
		  <p>&nbsp;</p>
		  <div id="left">
		    <div class="post">
		      <h1>About Us <span></span></h1>
		      <?php 
		      	echo $initAboutUs;
		      ?>
		    </div>
		    <div class="post">
			    <h1>Head Office<span></span></h1>
			    	<?php 
			    		echo $headOfficeInfo;
			    	?>
					<p>&nbsp;</p>
					<h1>Showroom </h1>
					<?php 
						echo $showroomInfo;
					?>
			  
<p>&nbsp;</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%">
      <h1>Outlets </h1>
      <?php for ($i=0; $i < sizeof($outletInfo); $i++) {
      	echo '<p><strong>';
      	echo $outletInfo[$i]->getOutletLocation();
      	echo '</strong><br>';
      	echo $outletInfo[$i]->getOutletAddress();
      	echo '<br>';
      	if ($outletInfo[$i]->getOutletTelephone() != '') {
	      	echo 'Telephone: ';
	      	echo $outletInfo[$i]->getOutletTelephone();
      	}
      	echo '</p>';
      }
      ?>
      <p>&nbsp;</p>
      </td>
    <td width="50%" valign="top">
    	&nbsp;
    <!-- 
    <h1>Factory</h1>
     -->
    <?php
    	/* 
    	for($i=0; $i < sizeof($factoryInfo); $i++) {
    	echo '<p><strong>';
    	echo $factoryInfo[$i]->getFactoryCountry();
    	echo '</strong><br/>';
    	echo $factoryInfo[$i]->getFactoryAddress();
    	echo '</p>';
    }*/
    ?>
  	</td>
  </tr>
</table>
<p>You are Visitor Number</p>
<p><a href="http://www.easycounter.com/">
<img src="http://www.easycounter.com/counter.php?winn123"
border="0" alt="stats counter"></a>
<p><embed src="../winmid/forrest.mid"width="140" height="40" autostart="true" loop="true"> 
</embed>
</p>
		    </div>
		  </div>
		  <div id="right">
				<p align="center" class="style1">Announcements!</p>
				<?php for ($i=0; $i < sizeof($announcementInfo); $i++) {
					echo '<p align="center" class="style1">';
					echo $announcementInfo[$i]->getAnnouncementDesc();
					echo '</p>';
				} 
				?>				
		  </div>
			<div class="clear"></div>
	  </div>
	</div>
	<div id="footer">
		<ul>
			<li><a href="index.php">About Us | </a></li>
			<li><a href="product.php">Products | </a></li>
			<li><a href="wholesale.html">Wholesale / Export | </a></li>
			<li><a href="members.html">Members Area | </a></li>
			<li><a href="contactUs.html">Enquiry / Contact Us | </a></li>
			<li><a href="Settlement.php">Shopping Cart</a></li>
		</ul>
		<span>copyright of Winning Marketing</span>
	</div>
    <p>&nbsp;</p>
</div>
</body>
</html>
<?php 
unset($initAboutUs);
unset($headOfficeInfo);
unset($showroomInfo);
unset($announcementInfo);
unset($factoryInfo);
unset($outletInfo);
unset($dao);
?>